Listing 11 - Page 0: No Title

##############################################################################
# Python From Scratch
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2024
# Site: https://pythonfromscratch.com
#
# File: listing\chapter 11\11.1472 - No Title.py
# Description: No Title
##############################################################################

import sqlite3
connection = sqlite3.connect("phonebook.db")
cursor = connection.cursor()
cursor.execute('''
        create table phonebook(
            name text,
            telephone text)
        ''')
cursor.execute('''
        insert into phonebook (name, telephone)
            values(?, ?)
            ''', ("Nilo", "7788-1432"))
connection.commit()
cursor.close()
connection.close()
Click here to download the file